<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'nvshens.com明星待处理数据';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="star-temp-index">

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            'id',
            ['label' => '名字', 'attribute' => 'name', 'value' => 'name', 'contentOptions' => ['style' => 'white-space: normal;', 'width' => '20%']],
            ['label'=>'头像远程地址','value' => 'header' , 'format' => ['image', ['height' => '120']]],
            ['label'=>'头像本地地址','value' => function($model){
                return Yii::getAlias('@storageUrl').$model->local_header;
            } , 'format' => ['image', ['height' => '120']]],
            ['label'=>"采集地址",'value'=>'url','format'=>['url',['target'=>"_blank"]]],

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
</div>
